package com.bootdo.lvyou_specialty.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

import com.bootdo.lvyou_specialty.dao.LvyouSpecialtyLunboDao;
import com.bootdo.lvyou_specialty.domain.LvyouSpecialtyLunbo;
import com.bootdo.lvyou_specialty.service.LvyouSpecialtyLunboService;



@Service
public class LvyouSpecialtyLunboServiceImpl implements LvyouSpecialtyLunboService {
	@Autowired
	private LvyouSpecialtyLunboDao lvyouSpecialtyLunboDao;
	
	@Override
	public LvyouSpecialtyLunbo get(Long id){
		return lvyouSpecialtyLunboDao.get(id);
	}
	
	@Override
	public List<LvyouSpecialtyLunbo> list(Map<String, Object> map){
		return lvyouSpecialtyLunboDao.list(map);
	}
	
	@Override
	public int count(Map<String, Object> map){
		return lvyouSpecialtyLunboDao.count(map);
	}
	
	@Override
	public int save(LvyouSpecialtyLunbo lvyouSpecialtyLunbo){
	
		if(lvyouSpecialtyLunbo.getId() != null) {
			return lvyouSpecialtyLunboDao.update(lvyouSpecialtyLunbo);
		}else {
			return lvyouSpecialtyLunboDao.save(lvyouSpecialtyLunbo);
		}		
	
		
	}
	
	@Override
	public int update(LvyouSpecialtyLunbo lvyouSpecialtyLunbo){
		return lvyouSpecialtyLunboDao.update(lvyouSpecialtyLunbo);
	}
	
	@Override
	public int remove(Long id){
		return lvyouSpecialtyLunboDao.remove(id);
	}
	
	@Override
	public int batchRemove(Long[] ids){
		return lvyouSpecialtyLunboDao.batchRemove(ids);
	}
	
}
